package com.teatrace.service.basic;

import java.io.Serializable;
import java.util.List;


public interface BasicService {

	public void add(Object obj) throws Exception;
	
	public void deleteById(Class clazz, Serializable id) throws Exception;
	
	public void deleteByIdArray(Class clazz, Serializable [] idArray) throws Exception;
	
	public void logicDeleteById(Class clazz, Serializable id) throws Exception;
	
	public void logicDeleteByIdArray(Class clazz, Serializable [] idArray) throws Exception;
	
	public void update(Object obj) throws Exception;
	
	public <T> T getById(Class<T> clazz, Serializable id) throws Exception;
	
	public <T> List<T> listByPage(Class<T> clazz, int page) throws Exception;
	
	public <T> List<T> listByCriteria(Class<T> clazz,String propertyName,Object value)throws Exception;
	
	public long count(Class clazz) throws Exception;
	
}
